<#include "../../../common/nolayout.ftl"/>
<@html css_=['life/user/user.css'] js_=['life/send/send_email_template.js']>
<body class="childrenBody">
<blockquote class="layui-elem-quote news_search">
    <form class="layui-form" id="listForm" action="${root}/email/template/list" method="post">
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input type="text" value="" placeholder="请输入邮件模板标题" name="title" class="layui-input search_input">
            </div>
            <div class="layui-inline">
                <label class="">是否有效</label>
                <div class="layui-input-inline">
                    <select name="status" style="color: #1acf74">
                        <option value="">全部</option>
                        <option value="0">有效</option>
                        <option value="1">无效</option>
                    </select>
                </div>
            </div>
            <a class="layui-btn search_btn" lay-submit lay-filter="queryForm">查询</a>
        </div>
        <div class="layui-inline">
            <a class="layui-btn layui-btn-normal email_template_add_btn">添加邮件模板</a>
        </div>
    </form>
</blockquote>
<div class="layui-form users_list">
    <table class="layui-table">
        <thead>
        <tr>
            <th>邮件模板标题</th>
            <th>状态</th>
            <th>创建时间</th>
            <th>更新时间</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody id="listDataBody"></tbody>
    </table>
</div>
<div  id="page"></div>
</body>


<script id="dataListTpl" type="text/html">
    {{#  if(d.list!=null&&d.list.length> 0){ }}
    {{#  layui.each(d.list, function(index, item){ }}
    <tr>
        <td>
            {{item.title||''}}
        </td>
        <td>
            <input type="checkbox" data-id="{{item.id}}" name="show" class="emailTemplateFrozen" lay-skin="switch" lay-text="有效|无效" lay-filter="isShow"
                   {{# if(item.status == 0){ }}checked="checked" {{# } }} />
        </td>
        <td>{{ layui.util.toDateString(item.insertDate, 'yyyy-MM-dd HH:mm:ss') }}</td>
        <td>{{ layui.util.toDateString(item.lastDate, 'yyyy-MM-dd HH:mm:ss') }}</td>
        <td>
            <div class="layui-btn-container">
                <a class="layui-btn layui-btn-xs emailTemplateEdit" data-id="{{item.id}}">
                    <i class="layui-icon">&#xe642;</i>编辑</a>
            </div>
        </td>
    </tr>
    {{#  }); }}
    {{#} else { }}
    <tr>
        <td colspan="5" style="text-align: center">无数据</td>
    <tr/>
    {{# }}}

</script>
</@html>